<template>
  <div class="ac-menu">
    <div class="menu-item">
      <span class="item blue" v-for="(item,index) in menu" :class="{'active': $route.fullPath.includes(`${item.path}`)}" :key="index" @click="selectMenu(item, index)">{{item.name}}</span>
    </div>
  </div>
</template>
<script>
export default {
  name: "headBar",
  computed: {
  },
  data () {
    return {
      currentIndex: 0,
      menu: [{
        name: '政策法规',
        path: '/installer/promotion/rules'
      }, {
        name: '活动通知',
        path: '/installer/promotion/notice'
      }, {
        name: '管理制度',
        path: '/installer/promotion/manage'
      }, {
        name: '申报系统',
        path: '/installer/promotion/system'
      }, {
        name: '成果推广',
        path: '/installer/promotion/results'
      }]
    }
  },
  components: {
  },
  mounted () {
  },
  created () {
  },
  methods: {
    selectMenu (item, index) {
      this.currentIndex = index
      this.$router.push({ path: item.path })
    }
  }
}

</script>

<style lang="scss">
</style>
